GXNewColorProfile
You can use theGXNewColorProfile
function to create a new color profile object.
gxColorProfile GXNewColorProfile(long size, void *colorProfileData);
- size
- The size in bytes of the profile data to assign to the new color profile object.
- colorProfileData
- A pointer to the profile data to assign to the new color profile object.
- function result
- A reference to the newly created color profile object.
DESCRIPTION
The GXNewColorProfile function creates a color profile object with an owner count of 1 from the profile data that you supply. The new color profile object is not a copy of the default color profile.If you specify a nonzero value for the
size
parameter, you must pass a ColorSync color profile structure to GXNewColorProfile. The function does not check for the validity of the profile data, but if the colorProfileData parameter isnil
and thesize
parameter is nonzero the function posts an error.You can create a zero-length profile by passing 0 for the
size
parameter when calling this function. The effect of a zero-length profile is to inhibit color matching.SPECIAL CONSIDERATIONS
If no error occurs, theGXNewColorProfile
function creates a color profile object; you are responsible for disposing of that object when you no longer need it.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory parameter_is_nil (debugging version) SEE ALSO
Zero-length profiles are described in the section "Zero-Length Profiles" on page 4-37.The format of the profile data in a color profile object is described in the section "Profile Data" beginning on page 4-36. The ColorSync Utilities are described in Inside Macintosh: Advanced Color Imaging.
To obtain a reference to the default color profile, use the
GXGetDefaultColorProfile
function, described in the previous section.